package com.ruoyi.project.service;

import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author abel lee
 * @create 2020-07-10 13:00
 **/
public interface CloudOssService {

    /**
     *
     * @param file
     * @return fileName
     */
    String uploadFile(MultipartFile file, boolean compress);

    String uploadFile(File file);

    String getQCloudUrl();

    void downloadFile(String key, HttpServletResponse response) throws IOException;

    void downloadFile(String key, File file) throws IOException;

    /**
     *
     * @param fileContent
     * @param fileExt  .jpg , .png
     * @return
     */
     String uploadFile(InputStream fileContent, String fileExt);


}
